package club.info.section1_creational.part01_factory;

/**
 * @Description :
 * @Author : Zhang Pc
 * @Date : 2020/11/28
 */
public class FactoryPatternDemo {

    public static void main(String[] args) {
        CarFactory carFactory = new CarFactory();
        Car benz = carFactory.getCar(CarTypeEnum.BENZ);
        benz.type();

        Car bmw = carFactory.getCar(CarTypeEnum.BMW);
        bmw.type();

        Car audi = carFactory.getCar(CarTypeEnum.AUDI);
        audi.type();
    }
}
